package me.khrystal.rxnews.http;

import android.support.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * @FileName: me.khrystal.rxnews.http.HostType.java
 * @Fuction: 请求数据的Host类型
 * @author: kHRYSTAL
 * @email: 723526676@qq.com
 * @date: 2016-03-04 14:28
 * @UpdateUser:
 * @UpdateDate:
 */
public class HostType {

    /**
     * 多少种Host类型
     */
    public static final int TYPE_COUNT = 3;


    @HostTypeChecker
    public static final int NETEASE_NEWS_VIDEO = 1;

    @HostTypeChecker
    public static final int SINA_NEWS_PHOTO = 2;

    @HostTypeChecker
    public static final int WEATHER_INFO = 3;


    /**
     * 替代枚举方案 使用IntDef保证类型安全
     */
    @IntDef({NETEASE_NEWS_VIDEO,SINA_NEWS_PHOTO,WEATHER_INFO})
    @Retention(RetentionPolicy.SOURCE)
    public @interface HostTypeChecker{

    }
}
